#pragma once


#ifndef LOADLIB
#define LOADLIB 1
#include <stdlib.h>
#include <iostream>
#include <assert.h>
#endif

typedef int SLDataType;
typedef class SingleList
{
public:
	SingleList(SLDataType x)
	{
		data = -1;
		next = nullptr;
	}
	void PushFront(SingleList*& slnode, SLDataType x);
	void PushBack(SingleList*& slnode, SLDataType x);
	void PopFront(SingleList*& slnode);
	void PopBack(SingleList*& slnode);
	int Size();
	SLDataType Tail();
	SLDataType Head();
	SingleList* Find(SLDataType x);
	bool Erase(SingleList*& slhead, SingleList* node);
	SingleList* BuyNewNode(SLDataType x);
	bool isEmpty();
	void Print();
	void Destroy();

private:
	SLDataType data;
	SingleList* next;
}SL;